package dao;

import domain.impl.AbstractBusinessObject;
import vo.ValueObject;

import java.util.List;
import java.util.Map;

public interface GenericDao<T extends AbstractBusinessObject, V extends ValueObject> {

    /*
        public V findByPrimaryKey(Long pk);
        public List<V> findAll();
        public List<V> findByNamedQuery(Object[] params, String name);
        public List<V> findByNamedQueryAndNamedParams(Map<String,Object> params, String name);
        public void create(V valueObject);
        public void update(V valueObject);
        public void delete(V valueObject);
        public int countAll();
        public Class<T> getBusinessObjectClass();
        public Class<V> getValueObjectClass();
      */

    public T findByPrimaryKey(Long pk);
    public List<T> findAll();
    public List<T> findByNamedQuery(Object[] params, String name);
    public List<T> findByNamedQueryAndNamedParams(Map<String,Object> params, String name);
    public void create(T valueObject);
    public void update(T valueObject);
    public void delete(T valueObject);
    public int countAll();
    public Class<T> getBusinessObjectClass();
    public Class<V> getValueObjectClass();

}

